#include "ServiceGetRCB.h"

CServiceGetRCB::CServiceGetRCB(void)
{
    m_GetURCB=new CServiceGetURCB;
    m_GetBRCB=new CServiceGetBRCB;
    if (!m_GetBRCB)
    {
        printf("Load ServiceGetURCB Error\n");
        m_GetBRCB=NULL;
        return;
    }
    if (!m_GetURCB)
    {
        printf("Load ServiceGetBRCB Error\n");
        m_GetURCB=NULL;
        return;
    }
}

CServiceGetRCB::~CServiceGetRCB(void)
{
    if (m_GetBRCB)
    {
        delete m_GetBRCB;
        m_GetBRCB=NULL;
    }
    if (m_GetURCB)
    {
        delete m_GetURCB;
        m_GetURCB=NULL;
    }
}
BOOL CServiceGetRCB::OnGetRCB(const char *rcbRef, CMTree & tree)
{
    QString Rcbref=QLatin1String(rcbRef);
    if (Rcbref.contains("RP"))
    {
         return m_GetURCB->OnGetURCB(rcbRef,tree);
    }
    if (Rcbref.contains("BR"))
    {
        return m_GetBRCB->OnGetBRCB(rcbRef,tree);
    }
}
